In this project we want to investigate the correlation between the diets and beak measurements of birds. We want to figure out if you can predict a bird diet based on their beak measurements alone.
A bird’s beak anatomy can vary greatly in size and shape depending on its habitat and diet. A bird uses its for more than just eating, they are also used to build nests and sometimes to fight of other creatures invading their territory.
Depending on the function a beak is required to carry out for a certain diet, the beak shape and size can vary greatly. e.g.
A cone shaped beak is used for picking up and cracking seeds easily.
Broader and flatter beaks are needed to create a larger surface area for bug catching in the air.
For bug feeding on the groud, beaks are more tweezer-like.
For meat eating, very strong beaks are required with the tip pointing downwards in order to hook onto the meat easier.
Long thing beaks with a spear-like tip are great for catching fish.
figure 1: Bird Beak Anatomy
The bird beak is made up of the cere, nare, culmen, maxilla, mandible and gape fillange (see fig. 1). It’s useful to note that both the nare and culmen are lengths of the beak that can be measured easily. They differ only as the nare is from nostril to tip whereas the culmen starts from the skull.
The different diet of birds can be sorted into different trophic level. A trophic level defines the hierarchy of an organism in a ecosystem. The main three trophic levels we will be looking at are:
Carnivore: A species whose diet consists of at least 70% of food from consuming live animals.
Herbivore: A species whose diet consists of at least 70% of food from consuming plants.
We decided to leave out scavenger birds since they make up less than 1% of our data and so using them may of led to false predictions.
We also left out omnivores, this was due to the overlapping diets that they have in correlation to Carnivores and Herbivores. An omnivore is a species whose diet consists of a mixed consumption of plants and animals at an approximately equal rate. This means that their beak measurements doesn’t have as definite relationships as the Carnivores and Herbivores, which may have also lead to false predictions.
The main trophic levels can be sub categorised into more niche trophics. Within these categories we found there to be a clearer link between the beak measurements and diets therefore we looked at the most common one, Invertivores to make our model. To be categorised as one the following trophic levels the species must get at least 60% of its diet from the corresponding food resource.
| Trophic Niche | Diet Description |
|---|---|
| Frugivore | Fruit |
| Granivore | Seeds or Nuts |
| Nectarivore | Nectar |
| Herbivore | Plant Materials in Non-Aquatic Systems; i.e. leaves, buds, whole flowers etc. |
| Herbivore Aquatic | Plant Materials in Aquatic Systems; i.e. algae and aquatic plant leaves |
| Invertivore | Invertebrate Animals in Terrestrial Systems; i.e. insects, worms, arachnids, etc. |
| Vertivore | Vertebrate Animals in Terrestrial Systems; i.e. mammals, birds, reptiles etc. |
| Aquatic Predator | Vertebrate & Invertebrate Animals in Aquatic Systems; i.e. fish, crustacea, molluscs, etc. |
| Scavenger | Carrion (Dead Animal Corpses), Offal or Refuse |
| Omnivore | Species using multiple niches, within or across trophic levels, in relatively equal proportions |
Our main data set for this project is an AVONET Supplementary Data Set called “birds_data”. It contains different bird species measurements and behavior; such as their habitat, diet and migration patterns.
We will be focusing on the following variables of this data set that are useful in our project:
Species ID: Unique identifier for species (or species group) linking to the Avibase dataset which provide detailed information on taxonomy, synonymy and distribution for the world’s birds.
Total Individuals: Number of individual birds measured for each species.
Complete Measures: Number of measured birds with a complete set of morphometric trait measurements.
Beak Length: The nares length is measured from the front edge of the nostril to the tip of the beak (see fig 2). We’ve chosen to focus on nares length over culmen length (the length from the tip of the beak to the base of the skull) as beak width and depth also refer to the nostril location, whereas the culmen length refers to the skull.
Beak Width: Width of the beak at the front edge of the nostrils (see fig 2).
Beak Depth: Depth of the beak at the front edge of the nostrils (see fig 2).
figure 2: Bird Measurements Taken
General Trophic: Main diet level groups (Carnivore, Omnivore, Herbivore, Scavenger)
Niche Trophic: Niche diet level, sub categories of Tropic Level groups.
In order to tidy our original data set we checked for official NAs and located them, selected our required columns to reduce the variable amount, then renamed and reordered the columns to keep them clean and making sense.
During our project we have used a multitude of data science techniques. The main ones we have used are as follows:
We have tidied and wrangled the data in order to make it clear and concise when analysing.
We have imported the original data set and transcribed into csv format to make it easy for us to read and access.
For data visualisation we have created many graphs to demonstrate our findings and data.
For our model, we are using logistic regression as we are predicting a discrete value.
The trophic levels don’t have equal amounts of data, generally the carnavores have many more entries compared to any other column. We don’t believe this is due to sampling bias, just due to the fact there are likely more carnivore species of bird in existence compared to others.
When investigating the beak data, there are three variables to consider; beak length (nares), beak width and beak depth. Summarising the data from these 3 columns we get:
## Beak_Nares_Length Beak_Width Beak_Depth
## Min. : 1.60 Min. : 0.700 Min. : 1.00
## 1st Qu.: 8.50 1st Qu.: 3.600 1st Qu.: 3.80
## Median : 11.70 Median : 5.000 Median : 5.80
## Mean : 17.06 Mean : 6.579 Mean : 8.06
## 3rd Qu.: 18.00 3rd Qu.: 7.700 3rd Qu.: 9.40
## Max. :389.80 Max. :88.900 Max. :110.90
We can visualise these values in a box plot whilst separating them into their respective General trophic levels:
Discounting the limited data for scavenger birds, these box plots show beak measurements don’t differ greatly between trophic levels on average.
As from above you can see that there wasn’t a clear distinction of the bird measurements between different General Trophic Levels. So we decided to have a look at the Niche Trophic Levels.
The Trophic with the least varied measurements across the beak are the Nectarivores whereas the trophics with the most variation are the aquatic predators, scavengers, omnivore and herbivore terrestrials. This meakes sence as nectarivores have a very niche diet, only really consiting of nectar compared to the much more varied diet of scavengers and omnivores. This shows that a more varied diet creates higher beak size variation accross the trophic levels.
The following graph summaries these mean beak data sets into values for each niche trophic level:
This further shows how birds with more variation in their diets have a higher variation of beak sizes and shapes.
This pie chart shows the proportion of niche trophics our data includes:
The majority of our Trophic Niche data is the invertivores, so we will be using that data for our model.
In order to answer our question of is it possible to predict diet based on beak measurements, we will need to use a logistic regression model since this is a discrete variable case.
For our model we will be predicting whether or not a species of bird is a certain trophic level based on its predicting factors of beak length, beak depth and beak width.
Initially, we wanted to try and see whether one predictor (just beak depth) would be a better predictor model than the three predictors, length, width and depth.
Our first model, model-I1, uses only beak Nares Length as a predictor value to predict whether the bird is an Invertivore or not. We then made a second model for Invertivores that uses all 3 predictor values (beak length, width and depth).
birds_fit_I model equation:
\[\log_{e}(\frac{p_{i}}{1-p_{i}}) = 1.171 - 0.016(Beak Nares Length) + 0.151(Beak Width) - 0.271(Beak Depth)\]
birds_fir_I1 model equation:
\[\log_{e}(\frac{p_{i}}{1-p_{i}}) = 0.809 - 0.058(Beak Nares Length)\]
The ROC of models I1 and 1 are below:
| Model | AUC vlue |
|---|---|
| Model_I | 0.7395973 |
| Model_I1 | 0.6806375 |
The ROC Curve on the left model_I1 is a good model. It’s area under the curve for the ROC graph is above 0.5, which means that our model is better at predicting whether a bird is an Invertivore or not than random chance. The Curve itself is above the diagonal
In terms of context researches prob have a similar model or method so that they can tell what birds eat without observation. e.g looking at bones. kind of how they do with dinosaurs. The thought behind out model is that birds beaks have evolved and taken on different beak shapes to best eat there chosen food type. Models like this could be used in conjunction with other methods.
model is binomial, can only predict success or failure for one food type. Cant predict from a wide variety. Model also isnt very good, would be better if if is within a certain range, or proportion. e.g beak width in proportion to beak length, might get more accurate results. look at cutoff prob table. There is alot of false positives.
see below, using a cutoff percentage of…
| Bird is not Invertivore | Bird is Invertivore | |
|---|---|---|
| Bird labelled Invertivore | 932 | 688 |
| Bird labelled not Invertivore | 117 | 463 |
| Bird is not Invertivore | Bird is Invertivore | |
|---|---|---|
| Bird labelled Invertivore | 1000 | 978 |
| Bird labelled not Invertivore | 49 | 173 |
i did a word count and its currently at 1646
references: - figure 1: https://www.vecteezy.com/png/25217819-watercolor-painted-beautiful-bird-hand-drawn-colorful-bird